DevJourney

Python/Basics/Factorial/While/while factorial.py

x=int(input("Enter a number: "))
f=1;i=1
while i<=x:
    f=f*i
    i+=1            
print(f"{x}! = {f}")
View on GitHub